package com.lynn.salary.entity;

import java.util.Date;

public class Subject_ extends BaseEntity{

	public static int DELETE = -1;
	public static String JH = "精华;";
	public static String TOP = "置顶;";
	
	private String id;
	private String title;
	private Date createTime;
	private Date lasteCommentTime;
	private String author;
	private String lasteCommentAuthor;
	private Integer visitCount;
	private Integer commentCount;
	private String tag;// 标签 ;号分隔 精华;置顶;
	private String content;
	private int isDeleted = 0;// 是否被删除 -1为删除 0为未删除 默认为0 未删除
	
	private String parent;
	private int level_;

	/**
	 * 获取所有字段
	 * 
	 * @return
	 */
	public static String[] getFields() {

		return new String[] { "id", "title", "createTime", "lasteCommentTime", "author", "lasteCommentAuthor", "visitCount",
				"commentCount", "tag", "content", "isDeleted" ,"parent" , "level_"};
	}

	/**
	 * 获取表名
	 * 
	 * @return
	 */
	public static String getTableName() {

		return "subject_";
	}

	/**
	 * 获取主键名字
	 * 
	 * @return
	 */
	public static String getPkName() {

		return "id";
	}

	public static Object[] getFk(String field) {
		if (field.equals("author")) {
			return new Object[] { User_.class, "id" };
		} else if (field.equals("lasteCommentAuthor")) {
			return new Object[] { User_.class, "id" };
		} else if (field.equals("parent")) {
			return new Object[] { Subject_.class, "id" };
		}
		return null;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLasteCommentTime() {
		return lasteCommentTime;
	}

	public void setLasteCommentTime(Date lasteCommentTime) {
		this.lasteCommentTime = lasteCommentTime;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getLasteCommentAuthor() {
		return lasteCommentAuthor;
	}

	public void setLasteCommentAuthor(String lasteCommentAuthor) {
		this.lasteCommentAuthor = lasteCommentAuthor;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public int getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(int isDeleted) {
		this.isDeleted = isDeleted;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getVisitCount() {
		return visitCount;
	}

	public void setVisitCount(Integer visitCount) {
		this.visitCount = visitCount;
	}

	public Integer getCommentCount() {
		return commentCount;
	}

	public void setCommentCount(Integer commentCount) {
		this.commentCount = commentCount;
	}

	public String getParent() {
		return parent;
	}

	public void setParent(String parent) {
		this.parent = parent;
	}

	public int getLevel_() {
		return level_;
	}

	public void setLevel_(int level_) {
		this.level_ = level_;
	}


}
